<!--
  ~ Copyright 1999-2015 dangdang.com.
  ~ <p>
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~ </p>
  -->

<div class="content-wrapper">
    <div class="page-height-min">
        <section class="content-header">
            <h1>作业定义</h1>
        </section>
        <section class="content">
        <div class="row">
            <div class="box box-info">
                <div id="job-toolbar">
                    <div class="form-inline" role="form">
                        <div class="form-group">
                            <a href="#" id="add-job" type="button" class="label label-success">增加</a>
                        </div>
                    </div>
                </div>
                <table id="job-table" 
                    data-show-refresh="true"
                    data-show-toggle="true"
                    data-striped="true"
                    data-toggle="table"
                    data-url="/api/job/jobs"
                    data-flat="true"
                    data-click-to-select="true"
                    data-search="true"
                    data-strict-search="false"
                    data-query-params="jobName"
                    data-query-params-type="notLimit"
                    data-pagination="true"
                    data-page-list="[10, 20, 50, 100]"
                    data-show-columns="true"
                    data-toolbar="#job-toolbar">
                    <thead>
                        <tr>
                            <th data-field="jobName" data-sortable="true">名称</th>
                            <th data-field="appName" data-sortable="true">应用名称</th>
                            <th data-field="jobClass" data-sortable="true">实现类</th>
                            <th data-field="shardingTotalCount" data-sortable="true">分片总数</th>
                            <th data-field="cron" data-sortable="true">cron表达式</th>
                            <th data-field="operate" data-formatter="operationJob">操作</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        </section>
    </div>
</div>
<div class="modal" id="data-detail-job" tabindex="-1" role="dialog" aria-labelledby="detail-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="update-model-size">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                    <h2 class="modal-title">作业详情</h2>
                </div>
                <div class="modal-body" id="detail-job-body">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="delete-data" tabindex="-1" role="dialog" aria-labelledby="delete-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="size-font">确认要删除该作业吗？</h3>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" id="delete-job-confirm" data-dismiss="modal">确认</button>
                <button type="button" class="btn btn-success" id="delete-job-remove" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="data-update-job" tabindex="-1" role="dialog" aria-labelledby="modify-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="update-model-size">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                    <h2 class="modal-title">修改作业</h2>
                </div>
                <div class="modal-body" id="update-job-body">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="data-add-job" tabindex="-1" role="dialog" aria-labelledby="add-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="update-model-size">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                    <h2 class="modal-title">添加作业</h2>
                </div>
                <div class="modal-body" id="add-job-body">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="delete-data—bean-name" tabindex="-1" role="dialog" aria-labelledby="bean-name-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h3>Spring方式配置</h3>
            </div>
            <div class="modal-body">
                <h3 class="size-font">请填写beanName名称</h3>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="delete-data-application-context" tabindex="-1" role="dialog" aria-labelledby="application-context-modal-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h3>Spring方式配置</h3>
            </div>
            <div class="modal-body">
                <h3 class="size-font">请填写Spring配置文件相对路径及名称</h3>
            </div>
        </div>
    </div>
</div>
<script src="lib/bootstrap-table/bootstrap-table.min.js"></script>
<script src="lib/bootstrap-table/bootstrap-table-zh-CN.js"></script>
<script src="js/job/jobs_overview.js"></script>
